// { value: 1, writable: true, enumerable: true, configurable: true }
console.log(Object.getOwnPropertyDescriptor({ x: 1 }, "x"));
const random = {
  get octet() {
    return Math.floor(Math.random() * 256);
  },
};
// {
//     get: [Function: get octet],
//     set: undefined,
//     enumerable: true,
//     configurable: true
// }
console.log(Object.getOwnPropertyDescriptor(random, "octet"));
// 对继承的属性或不存在的属性返回 undefined
console.log(Object.getOwnPropertyDescriptor({}, "x")); // undefined
console.log(Object.getOwnPropertyDescriptor({}, "toString")); // undefined
